home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
HSI2ARR.ZIP
/
README.TXT
< prev
Wrap
Text File
|
1994-08-17
|
3KB
|
54 lines
HSI2ARR.EXE -- Converts HSI RAW Pictures to C arrays (C Source included)
By Darion (thimj@u.washington.edu)
This utility converts the HSI RAW format, put out by Handmade Software
to C readable arrays. The command line for the executable is as follows.
hsi2arr.exe <input_file> <output_file>
Where input file is the RAW image you want converted, and the output file
is the header file you want created for your programming. The input file must
be prepared with IMAGE ALCHEMY 1.7. Available from oak.oakland.edu under
/pub/msdos/graphics/alch17.zip (or somewhere close like that). That is only a
demo version of Image Alchemy. The command line switch for converting a graphic
image to a raw file is
alchemy -r <input_file> <output_file>
Example: This will convert a 16 color PCX file to a 256 Color RAW file.
alchemy -r -c256 <peace.pcx> <peace.raw>
The output file will include several defines, including the WIDTH, HEIGHT,
GAMMA, HORDPI, VERDPI, and COLOR #defines. It will then have a character array
for holding the palette data. This can range from 6 - 768 bytes, depending on
how many colors the converted file had. It then defines the actual picture data
in a double-dimensioned array, ie: PICDATA[200][320].
This packages comes with two examples of using the header files. Both are very
simple examples.
histest.c is a 96x96 256c RAW file that is displayed. Compiled with TC 3.0,
small memory model.
histest3.c is a 320x200 256C RAW file that is displayed. Compiled with TC
3.0 and a compact memory model.
HSI2ARR assumes you will be using the _SMALL_ memory model so be sure to
change the output file to match which model you are using. ie: If your
picture data is 64000+ bytes or larger, you need to change it from:
char PICDATA[200][320] to char far PICDATA[200][320]
If you use this program and find it to be helpful, greet me or something!
I am releasing this as EMAILware. If you use it steadily you *MUST* email
me and flame me about my bad coding style, comment me on the program, suggest
additions to the program, etc, etc. You can modify this code AS MUCH AS YOU
want to, AS LONG as you credit me in the modified sources and/or executable.
TRADEMARKS: Image Alchemy and HSI RAW are trademarks of Handmade Software Inc.
I supply each of the programs on an 'as is' basis in the hope that
they will be useful but with absolutely no warranty of any kind, and assume
no liability or responsibility for any ill they may cause whatsoever.